package com.example.lk.controller;

import com.alibaba.fastjson.JSON;
import com.example.lk.pojo.User;
import com.example.lk.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lk
 * @date 2020/1/8 0008 10:02
 */

@RestController
@RequestMapping("/lk")
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/a")
    public String lk(){
        User u  = userService.getMe();
        String l = u.getName();
        
        return  JSON.toJSONString(l);
    }
}
